package qingke.mybatis.pojo;

public class OrderDetail {
	private Integer id;

	private String orderCode;

	private String productPrice;

	private String productName;

	private String productNumber;

	private Integer orderId;

	private Integer productId;

	public OrderDetail() {
	}

	public OrderDetail(String orderCode, Product product, Integer orderId,Integer productNumber) {
		this.orderCode = orderCode;
		this.productPrice = Integer.toString(product.getProductPrice());
		this.productName = product.getProductName();
		this.productId = product.getId();
		this.productNumber = Integer.toString(productNumber);
		this.orderId = orderId;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode == null ? null : orderCode.trim();
	}

	public String getProductPrice() {
		return productPrice;
	}

	public void setProductPrice(String productPrice) {
		this.productPrice = productPrice == null ? null : productPrice.trim();
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName == null ? null : productName.trim();
	}

	public String getProductNumber() {
		return productNumber;
	}

	public void setProductNumber(String productNumber) {
		this.productNumber = productNumber == null ? null : productNumber.trim();
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	@Override
	public String toString() {
		return "OrderDetail [id=" + id + ", orderCode=" + orderCode + ", productPrice=" + productPrice
				+ ", productName=" + productName + ", productNumber=" + productNumber + ", orderId=" + orderId
				+ ", productId=" + productId + "]";
	}

}